<%@page import="java.util.ArrayList"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript" src="js/dcc.methods.js"></script>
<script
	src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"
	type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="css/styleTablas.css" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>INICTEL-DCC | Generar informe de disponibilidad</title>
<!-- 
Estilos y js de Jquery
 -->
<link type="text/css" rel="stylesheet" href="css/jquery-ui.theme.css">
<link type="text/css" rel="stylesheet"
	href="css/jquery-ui.theme.min.css">
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery-ui.js" /></script>
<script type="text/javascript" src="js/jquery-ui.min.js" /></script>
<link type="text/css" rel="stylesheet"
	href="css/jquery-ui.structure.css" />
<link type="text/css" rel="stylesheet"
	href="css/jquery-ui.structure.min.css" />
<link type="text/css" rel="stylesheet" href="css/jquery-ui.css" />
<link type="text/css" rel="stylesheet" href="css/jquery-ui.min.css" />
<!--

fin de estilos y js de Jquery

-->

<script type="text/javascript">
	function agregafilita() {
		var codi = document.getElementById('txtcodigoambiente').value;
		var tipo = document.getElementById('tipoambselect').value;
		tipo = tipo == 1 ? 'Aula' : 'Laboratorio';
		$("#tbambdisp tbody")
				.append(
						"<tr>"
								+ "<td>"
								+ codi
								+ "</td>"
								+ "<td>"
								+ tipo
								+ "</td>"
								+ "<td>"
								+ '<input type="button" value="eliminar" onclick="deleteRow(this);"/>'
								+ "</td>" + "</tr>");
	}
	
	function agregafilita2() {
		var codi = document.getElementById('txtcodigodoc').value;
		var tipo = document.getElementById('txtnombresapedoc').value;
		$("#tbdocdisp tbody")
				.append(
						"<tr>"
								+ "<td>"
								+ codi
								+ "</td>"
								+ "<td>"
								+ tipo
								+ "</td>"
								+ "<td>"
								+ '<input type="button" value="eliminar" onclick="deleteRow2(this);"/>'
								+ "</td>" + "</tr>");
	}

	function deleteRow(row) {
		var d = row.parentNode.parentNode.rowIndex;
		document.getElementById('tbambdisp').deleteRow(d);
	}
	
	function deleteRow2(row) {
		var d = row.parentNode.parentNode.rowIndex;
		document.getElementById('tbdocdisp').deleteRow(d);
	}
	
	function datosTextos() {
		var textos = new Array();
		 for (var i=2;i<document.getElementById('tbambdisp').rows.length;i++) {
			 for (var j=0;j < document.getElementById('tbambdisp').rows[i].cells.length-2;j++){
				 textos[i-2] = document.getElementById('tbambdisp').rows[i].cells[j].innerHTML;
				 }
		 }
	}
</script>
</head>
<body onload="cargarSoliInf();">
	<form>
	<button type="button" onclick="datosTextos();">datos</button>
	<span ></span>
		<table width="68%%" align="center">
			<tr>
				<td colspan="2" align="center">
					<h1>Generar informe de disponibilidad</h1>

				</td>
			</tr>
			<tr>
				<td rowspan="2" width="50%">
					<div id="panelginfsolpen">
						<h3>Solicitudes pendientes</h3>
						<table width="100%">
							<tr>
								<td>
									<div id="tbsoli"></div> <span id="separador"></span>
								</td>
							</tr>
						</table>
					</div>
				</td>
				<td width="50%">
					<div id="panelginfdetsoli">
						<h3>Detalle de solicitud</h3>
						<table width="100%">
							<tr>
								<td><label for="txtnrosol">Nro. solicitud</label></td>
								<td><input type="text" id="txtnrosol" disabled="disabled" /></td>
							</tr>
							<tr>
								<td><label for="txtnomcur">Nombre de curso</label></td>
								<td><input type="text" id="txtnomcur" disabled="disabled" /></td>
							</tr>
							<tr>
								<td><label for="txtrazsoc">Raz. soc. cliente</label></td>
								<td><input type="text" id="txtrazsoc" disabled="disabled" /></td>
							</tr>
							<tr>
								<td><label for="txtfecemi">Fecha de emision</label></td>
								<td><input type="text" id="txtfecemi" disabled="disabled" /></td>
							</tr>
							<tr>
								<td><label for="txtcantpar">Cant. participantes</label></td>
								<td><input type="text" id="txtcantpar" disabled="disabled" /></td>
							</tr>
						</table>
					</div>
				</td>
			</tr>
			<tr>
				<td width="50%">
					<div id="panelginfhorario">
						<h3>Horario</h3>
						<table width="100%">
							<tr>
								<td><label for="txthini">Hora de inicio</label></td>
								<td><input type="text" id="txthini" disabled="disabled" /></td>
							</tr>
							<tr>
								<td><label for="txthfin">Hora de fin</label></td>
								<td><input type="text" id="txthfin" disabled="disabled" /></td>
							</tr>
							<tr>
								<td><label for="txtfrec">Frecuencia</label></td>
								<td><input type="text" id="txtfrec" disabled="disabled" /></td>
							</tr>
						</table>
					</div>
				</td>
			</tr>
			<tr>
				<td colspan="2">
					<div id="panelginfdatainf">
						<h3>Datos de Informe de disponibilidad</h3>
						<table width="100%">
							<tr>
								<td width="35%">
									<div id="panelginambdisp">
										<h3>Ambientes disponibles</h3>
										<table width="100%" id="tbambdisp">
											<thead>
												<tr>
													<td colspan="3"><button type="button" id="btnbambinf"
															onclick="cargarAmbientesBuscar();">Buscar
															Ambiente</button></td>
												</tr>
											</thead>
											<tbody>
												<tr>
													<th>Codigo ambiente</th>
													<th>tipo</th>
													<th>Accion</th>
												</tr>
											</tbody>
										</table>
									</div>
								</td>
								<td width="35%"><div id="panelginfdocdisp">
										<h3>Docentes disponibles</h3>
										<table width="100%" id="tbdocdisp">
											<thead>
												<tr>
													<td colspan="3"><button type="button" id="btnbdocinf" onclick="cargardocentesbuscar();">Buscar
															Docente</button></td>
												</tr>
											</thead>
											<tbody>
												<tr>

													<th>Codigo docente</th>
													<th>nombre</th>
													<th>Accion</th>
												</tr>
											</tbody>
										</table>
									</div></td>
								<td width="30%">
								
									<button type="button" id="btngenerarinforme">Generar Informe de Disponibilidad</button>
								</td>
							</tr>
						</table>
					</div>
				</td>
			</tr>
		</table>
	</form>

	<div id="dgBuscarAmbiente" title="Buscar Ambiente Disponible">
		<table>
			<tr>
				<td>
					<div id="frmbuscarambiente"></div>
				</td>
			</tr>
		</table>


	</div>
	<div id="dgBuscarDocente" title="Buscar Docente Disponible">
		<table>
			<tr>
				<td>
					<div id="frmbuscardocente"></div>
				</td>
			</tr>
		</table>


	</div>


	<!-- Mensajes -->
	<jsp:include page="ui/msg.jsp"></jsp:include>
	<!-- fin de mensajes  -->

	<jsp:include page="ui/ui.jsp"></jsp:include>
</body>
</html>